package com.summerbird.mallchat.common.chat.strategy.mark;

import com.summerbird.mallchat.common.chat.domain.enums.MessageMarkTypeEnum;
import org.springframework.stereotype.Component;

/**
 * 点踩标记策略类
 */
@Component
public class DisLikeStategy extends AbstractMsgMarkStrategy{
    @Override
    protected MessageMarkTypeEnum getTypeEnum() {
        return MessageMarkTypeEnum.DISLIKE;
    }

    @Override
    public void unMark(Long uid, Long msgId) {
        super.unMark(uid, msgId);
        // 同时取消点赞操作
        MsgMarkFactory.getStrategyOrNull(MessageMarkTypeEnum.LIKE.getType()).unMark(uid, msgId);
    }
}
